Tables in the METAMOD2 catalogue
--------------------------------

DataSet                 - A dataset represents some data that for some reason is
                          seen as a unit. Datasets are organised in two levels
                          where a main dataset may contain subdatasets. The 'DS_parent'
                          field tells which level the dataset
                          belongs to. DS_parent = 0 represents the top level.
                          For subdatasets, DS_parent points to the parent dataset.

SearchCategory          - Table defining the search categories by which the database
                          can be searched. Each entry is characterised by a search
                          category type (1 - Basic keyword search, 2 - Hierarchical
                          keyword search, 3 - Numerical scale search and 
                          4 - Geographical search). Each entry also has a text field
                          (SC_fnc) that sets som configurable contants governing
                          the search process.

HierarchicalKey         - Contains keywords organised in a set of tree structures
                          (forest). Each row represents one keyword ('HK_name') and
                          one node in a tree. If the node has child nodes, the
                          keyword is a general term (generalisation of the keywords
                          in the child nodes).

                          The tree structure is implemented by child nodes having a
                          'HK_parent' field pointing to the parent node. In addition,
                          'HK_level' gives the level of the node in the tree. 
                          HK_level = 1 corresponds to the top level.

BasicKey                - This table holds keywords that are all on the same "level".
                          I.e, no hierarchical relationship exists between different
                          entries in this table. But the keywords are divided in 
                          different groups (or search categories), using the SC_id
                          field.

HK_Represents_BK        - This relationship is used to create an extra bottom level
                          on the hierarchical structures found in the
                          HierarchicalKey table. Entries in the HierarchicalKey
                          table that have no child nodes, may be related to a set of
                          BasicKey entries through this relationship.

BK_Describes_DR         - This relationship tells which keywords in the BasicKey
                          table characterise a given DataReference.

NumberItem              - This table defines an interval on some numeric scale
                          (including time). Each interval is connected to a search
                          category (through SC_id) where the details of the numeric
                          scale is stored. This table also incorporates a 
                          relationship to the DataReference table through the DR_id
                          field. I.e each entry describes the interval
                          for one DataReference and one variable type (like time).

GeographicalArea        - Table representing geographical areas. Each given by a set
                          of quadtree nodes.

GA_Describes_DS         - Oppgitt GeographicalArea beskriver et DataSet.

MetadataType            - Table of metadata types found in the database.

Metadata                - Table of all metadata in the database. Each metadata entry
                          comprise a text string represnting the content of the
                          metadata (e.g. "Output from the HIRLAM model") and the
                          metadata type (e.g. "title").

DS_Has_MD               - Relationship tagging metadata onto datasets.

Sessions                - Table holding information on user sessions in the
                          METAMODSEARCH module. Each table entry has a session
                          identifier that is remebered between web page
                          presentations in a user session. State information
                          describing, among other things, selection criteria for
                          searching the database, is stored in a sessionstate
                          field. A timestamp field, set to the last time when the
                          session was active, is used to invalidate a session when
                          a timeout limit has been exceeded.
